package org.iblink.core.service.impl;

import java.util.List;

import org.iblink.core.domain.dao.AssetDao;
import org.iblink.core.domain.model.Asset;
import org.iblink.core.domain.model.Category;
import org.iblink.core.service.AssetService;

public class AssetServiceImpl implements AssetService {
  
  private AssetDao assetDao;

  @Override
  public void delete(Asset asset) {
    assetDao.deleteAsset(asset.getId());
  }

  @Override
  public List<Asset> getAssetsForCategory(Category category) {
    return assetDao.getAssetsForCategory(category.getId());
  }

  @Override
  public void save(Asset asset) {
    assetDao.saveAsset(asset);
  }

  @Override
  public Asset findByPath(String path) {
    return assetDao.findByPath(path);
  }

  /**
   * @return the assetDao
   */
  public AssetDao getAssetDao() {
    return assetDao;
  }

  /**
   * @param assetDao the assetDao to set
   */
  public void setAssetDao(AssetDao assetDao) {
    this.assetDao = assetDao;
  }
}
